<#include "../../../common/freemarker/include_header.ftl">
<script src="common/ckeditor_4.5.4_full/ckeditor/ckeditor.js"></script>
<body>
    <p>
     <textarea cols="20" rows="2"  id="textarea" name="content" >${rhs["content"]?if_exists}</textarea>
    </p>
  	<p style="text-align:center;">
		<br>
			<button type="button" class="btn btn-xs btn-primary"  onclick="javascript:data_submit();">保存编辑内容</button>
			<br><br><br><br><br><br><br><br><br><br>	
			<br><br><br><br><br><br><br><br><br><br>
			&nbsp;
	</p>	
<script>
    CKEDITOR.replace( 'textarea' ,{
        language: 'zh-cn',
        height: 260,
        toolbarGroups : [
                         { name: 'document', groups: [ 'mode'] },
                        { name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] },
                        
						{ name: 'links', groups: [ 'links' ] },
						{ name: 'insert', groups: [ 'insert' ] },
						{ name: 'styles', groups: [ 'styles' ] },
						{ name: 'colors', groups: [ 'colors' ] },   
			
		]

    });
    
	function data_submit(){
	   var value =escape(encodeURIComponent(CKEDITOR.instances.textarea.getData()));
	   alert("v="+value);
	    $.ajax({
		         type:"POST",
		         url: "common_edit_update.do",
		         data:"beanname=${rhs["objectname"]?if_exists}&column=${rhs["propertyname"]?if_exists}&id=${rhs["id"]?if_exists}&columnValue="+value,
		         cache: false,
		         success: function(html){
		             
		         	  if(parent.window.hs!=null) 	parent.window.hs.close();
		         }
		});  	    
	}   
</script>
</body>
</html>